<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script type="module">
    import { reactive, effect } from './index.js';

    const product = reactive({
      name: 'BMW X3',
      price: 370000,
      number: 1
    })

    let total;
    effect(() => {
      total = product.price * product.number;
    })

    console.log(total)

    product.price = 450000

    console.log(total)

    product.number = 10

    console.log(total)
  </script>
</body>
</html>